/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pscu.smadmin.command;

import com.pscu.smadmin.utils.HibernateUtil;
import com.servicesManagement.model.Service;
import org.hibernate.Session;

/**
 *
 * @author Aruna
 */
public class CreateServiceCommand extends BaseCommand {

    private String serviceDescription;

    public CreateServiceCommand() {
    }

    public CreateServiceCommand(String serviceDescription) {
        this.serviceDescription = serviceDescription;
    }

    public CreateServiceCommand(String serviceDescription, String commandName, String userId) {
        super(commandName, userId);
        this.serviceDescription = serviceDescription;
    }

    public String getServiceDescription() {
        return serviceDescription;
    }

    public void setServiceDescription(String serviceDescription) {
        this.serviceDescription = serviceDescription;
    }

    @Override
    public Boolean execute() throws CommandException {
        return null;
    }

    private void createService() {

        Session s = HibernateUtil.getSessionFactory().openSession();
        s.beginTransaction();
        
        Service service = new Service();
        
        
        
        s.persist(s);
        
       

    }
}
